package com.xly.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xly.dao.MedicalRecordDao;
import com.xly.entity.MedicalRecord;
import com.xly.service.MedicalRecordServcie;

/** 
* @author Your-Name: Carey
* @version Create-Date：2020年3月18日 下午5:43:37 
* Class Description:
*/
@Service
public class MedicalRecordServcieImpl implements MedicalRecordServcie{

	@Autowired
	private MedicalRecordDao medicalRecordDao;
	
	//查询list
	public List<MedicalRecord> selectCondition(MedicalRecord medicalRecord){
		List<MedicalRecord> list = medicalRecordDao.selectCondition(medicalRecord);
		return list;
	}
	
	//批量删除
	public int deleteBatch(int[] ids) {
		int i = medicalRecordDao.deleteBatch(ids);
		return i;
	}
	
	//根据id查询 
	public MedicalRecord selectById(int id) {
		MedicalRecord medicalRecord = medicalRecordDao.selectById(id);
		return medicalRecord;
	}
	
	//插入
	public int insertEntity(MedicalRecord medicalRecord) {
		int i = medicalRecordDao.insertEntity(medicalRecord);
		return i;
	}
	
	//更新
	public int updateById(MedicalRecord medicalRecord) {
		int i = medicalRecordDao.updateById(medicalRecord);
		return i;
	}
}
